//
//  OrderAdressInfoCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/8/26.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

class OrderAdressInfoCell: BaseTableViewCell {

    @IBOutlet weak var nameLabel: UILabel!
    
    @IBOutlet weak var phoneLabel: UILabel!
    
    @IBOutlet weak var defulLabel: UILabel!
    
    @IBOutlet weak var dressLabel: UILabel!
    
    
    var addressModel : AddressInfoModel?{
    
    
        didSet{
        
            if addressModel == nil {
                return
            }
            
            nameLabel.text = addressModel?.true_name
            
            phoneLabel.text = addressModel?.mob_phone
            
            dressLabel.text = addressModel!.area_info + addressModel!.address
            
            if addressModel!.is_default == "1" {
                defulLabel.isHidden = false
            } else {
                defulLabel.isHidden = true

            }
        
        }
    
    
    }

    
    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        nameLabel.font = UIFont.boldSystemFont(ofSize: 15)
        phoneLabel.font = UIFont.boldSystemFont(ofSize: 15)
        dressLabel.textColor = UIColor.dakGray()
        defulLabel.addCornerAndBorder(borderColor: UIColor.red, borderWidth: 0.6, masksToBounds: true, cornerRadius: 0)
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
